package ch.unisi.inf.java.project.riskbami.model;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

/**
 * This class handles the about command in the menu
 * 
 * @author minellir@lu.unisi.ch
 * @author babazadm@lu.unisi.ch
 */
public final class AboutCommand extends AbstractAction {
    
    /**
     * Constructor for the class AboutCommand.
     */
    public AboutCommand() {
        // menu item text
        putValue(NAME, "About");
        // tooltip text
        putValue(SHORT_DESCRIPTION, "About RiskBaMi");
    }
    
    /**
     * This method handles the action performed once this item in the menu is clicked.
     */
    public void actionPerformed(final ActionEvent ev) {
        JOptionPane.showMessageDialog(null,
        "RiskBaMi powered by Masiar Babazadeh and Roberto Minelli\n",
        "About BaMiRisk",
        JOptionPane.INFORMATION_MESSAGE);
    }
    
}